package com.acwing.partition35;

import java.io.*;

/**
 * @author `RKC`
 * @date 2022/3/12 20:55
 */
public class AC3416时间显示 {

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        long timestamp = Long.parseLong(reader.readLine());
        long r = timestamp % (24 * 60 * 60 * 1000);
        int h = (int) (r / 1000 / 60 / 60), m = (int) (r / 1000 / 60 % 60), s = (int) (r / 1000 % 60);
        writer.write(String.format("%02d:%02d:%02d\n", h, m, s));
        writer.flush();
    }
}
